<?php
	if ($_GET['do'] == 'display')
	{
		$sql = new db();
		$req = 'SELECT cl.* FROM client AS cl, client_pere AS clp WHERE clp.GLN_P = '.$_SESSION['login'].' AND clp.GLN_F = cl.GLN_Client';
		$sql->query($req);
		$array = array();
		while ($res = $sql->fetch_array())
			$array[] = $res;
	}
	else if($_GET['do'] == 'delete')
	{
		$sql = new db();
		$req = "DELETE client_pere, client FROM client_pere, client WHERE GLN_F =".$_GET['del']." AND GLN_Client =".$_GET['del'];
		$sql->query($req);
		header("location:".ABS_PATH.ROOT."?page=Client/GestCLient&fct=Client/GestClient&do=display");	
	}
?>